package com.sky.mapper.admin;

import com.sky.aop.AutoFill;
import com.sky.enumeration.OperationType;
import com.sky.pojo.SetmealDish;
import com.sky.vo.DishItemVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @Description SetmealDishMapper
 * @Author lyh
 * @Date 2024-09-21
 */
@Mapper
public interface SetmealDishMapper {
    /**
     * 增加套餐对应的菜品
     * @param setmealDishes
     */
    void saveMore(@Param("setmealDishes") List<SetmealDish> setmealDishes);

    /**
     * 根据套餐id删除套餐菜品
     * @param ids
     */
    void deleteBySetmealIds(@Param("ids") Long[] ids);
    @Select("select * from setmeal_dish where dish_id=#{dishId}")
    List<SetmealDish> getByDishId(Long dishId);
    List<DishItemVO> getBySetmealId(Long setmealId);
}
